package com.hc.radius.command;

import java.util.List;

import com.hc.radius.service.Const;
import com.hc.util.Util;

public class QueryUserCommand extends Command {

	
	@Override
	public int getLen(CommandParam cmdp) {
		int len = 60 + Const.QUERY_C280_ORDER.length;
		len += Util.getLen(cmdp.queryname);
		return len;
	}

	@Override
	public void addCmdContent(List<Byte> list, CommandParam cmdp) {
		int len = Const.QUERY_C280_USER.length;
		CommandWrap.addByte(list,Const.QUERY_C280_USER);
		List<Byte> temp =  Util.toByte( Util.toHexString(cmdp.queryname));
		len += temp.size();
		list.addAll(temp);
		CommandWrap.addTail(list, len);	
	}
	 
}